package deletedelete2;

import java.util.Scanner;

public class Student extends Person{

    double[] score=new double[5];

    public Student(String name, int age, String sex) {
        super(name, age, sex);
    }

    public void getScore(){
        Student s1=new Student("鱼骨头",18,"男");
        Scanner scanner=new Scanner(System.in);
        System.out.println("请以此输入五门课的成绩分数");
        for (int i = 0; i < 5; i++) {
            score[i]=scanner.nextDouble();
        }
        double sum=0;
        for (int i = 0; i < 5; i++) {
            sum+=score[i];
        }
        double average=sum/5;
        System.out.println("学生"+s1.name+"的平均成绩为:"+average);
    }


    public static void main(String[] args) {
        Student s1=new Student("鱼骨头",18,"男");
        s1.getScore();
        System.out.println("不管成绩咋样,吃完饭在去学习!!!,加油,干饭人");
    }


}
